FLAGS = -std=c++0x -lpthread
DEBUG_FLAGS = -g $(FLAGS)

FILES = process.cpp process.h MMU.cpp MMU.h MM.h PageTable.h PageTable.cpp TLB.h TLB.cpp

process_test: process_test.cpp $(FILES)
	c++ $< $(FLAGS) -o $@

process_test_dbg: process_test.cpp process_test
	c++ $< $(DEBUG_FLAGS) -o $@

.PHONY: main, debug, run

main: osMain.cpp scheduler.cpp scheduler.h $(FILES)
	c++ $< $(FLAGS) -o $@

debug: process_test_dbg

all: process_test main

run: main
	./main

fifo: main
	./main -policy fifo

lrupure: main
	./main -policy pure

lruapprox: main
	./main -policy approx

workingset: main
	./main -policy workingset

clean:
	rm main
	rm process_test
